<?php

/**
 * Raspored form base class.
 *
 * @package    dnevnik
 * @subpackage form
 * @author     Your name here
 * @version    SVN: $Id: sfPropelFormGeneratedTemplate.php 16976 2009-04-04 12:47:44Z fabien $
 */
class BaseRasporedForm extends BaseFormPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'id'        => new sfWidgetFormInputHidden(),
      'razred_id' => new sfWidgetFormPropelChoice(array('model' => 'Razred', 'add_empty' => false)),
      'dan'       => new sfWidgetFormInput(),
      'tip'       => new sfWidgetFormInput(),
      'cas_p'     => new sfWidgetFormPropelChoice(array('model' => 'Predmet', 'add_empty' => true)),
      'cas_0'     => new sfWidgetFormPropelChoice(array('model' => 'Predmet', 'add_empty' => true)),
      'cas_1'     => new sfWidgetFormPropelChoice(array('model' => 'Predmet', 'add_empty' => true)),
      'cas_2'     => new sfWidgetFormPropelChoice(array('model' => 'Predmet', 'add_empty' => true)),
      'cas_3'     => new sfWidgetFormPropelChoice(array('model' => 'Predmet', 'add_empty' => true)),
      'cas_4'     => new sfWidgetFormPropelChoice(array('model' => 'Predmet', 'add_empty' => true)),
      'cas_5'     => new sfWidgetFormPropelChoice(array('model' => 'Predmet', 'add_empty' => true)),
      'cas_6'     => new sfWidgetFormPropelChoice(array('model' => 'Predmet', 'add_empty' => true)),
      'cas_7'     => new sfWidgetFormPropelChoice(array('model' => 'Predmet', 'add_empty' => true)),
      'cas_8'     => new sfWidgetFormPropelChoice(array('model' => 'Predmet', 'add_empty' => true)),
    ));

    $this->setValidators(array(
      'id'        => new sfValidatorPropelChoice(array('model' => 'Raspored', 'column' => 'id', 'required' => false)),
      'razred_id' => new sfValidatorPropelChoice(array('model' => 'Razred', 'column' => 'id')),
      'dan'       => new sfValidatorInteger(),
      'tip'       => new sfValidatorInteger(),
      'cas_p'     => new sfValidatorPropelChoice(array('model' => 'Predmet', 'column' => 'id', 'required' => false)),
      'cas_0'     => new sfValidatorPropelChoice(array('model' => 'Predmet', 'column' => 'id', 'required' => false)),
      'cas_1'     => new sfValidatorPropelChoice(array('model' => 'Predmet', 'column' => 'id', 'required' => false)),
      'cas_2'     => new sfValidatorPropelChoice(array('model' => 'Predmet', 'column' => 'id', 'required' => false)),
      'cas_3'     => new sfValidatorPropelChoice(array('model' => 'Predmet', 'column' => 'id', 'required' => false)),
      'cas_4'     => new sfValidatorPropelChoice(array('model' => 'Predmet', 'column' => 'id', 'required' => false)),
      'cas_5'     => new sfValidatorPropelChoice(array('model' => 'Predmet', 'column' => 'id', 'required' => false)),
      'cas_6'     => new sfValidatorPropelChoice(array('model' => 'Predmet', 'column' => 'id', 'required' => false)),
      'cas_7'     => new sfValidatorPropelChoice(array('model' => 'Predmet', 'column' => 'id', 'required' => false)),
      'cas_8'     => new sfValidatorPropelChoice(array('model' => 'Predmet', 'column' => 'id', 'required' => false)),
    ));

    $this->widgetSchema->setNameFormat('raspored[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'Raspored';
  }


}
